<template>
  <div>
    <h2>news index page</h2>
    <p>NewsId:{{$route.params.id}}</p>
    <ul>
      <li><a href="/">HOME</a></li>
      <li><nuxt-link :to="{name:'news-id',params:{id:123}}">News-1</nuxt-link></li>
      <li><a href="/news/jspang">news</a></li>
    </ul>
  </div>
</template>

<script>
    export default {
        name: "_id",
        validate({params}){
          return /^\d+$/.test(params.id)
        },
       data(){
          return{
             title:this.$route.params.title,
          }
       },
      head(){
        return{
           title:this.title,
            meta:[
              {hid:'bbb',name:'luo new1',content:'this is new page luo'}
            ]
        }
      }
    }
</script>

<style scoped>

</style>
